Skip to content

test(shell): 修正剪贴板 owner 清理的错误码归属 (#85) - #217

Merged
JavaZeroo merged 1 commit into
mainfrom
fix/owner-cleanup-error
Oct 30, 2026
Merged

JavaZeroo merged 1 commit into
mainfrom
fix/owner-cleanup-error

Conversation

@JavaZeroo

Copy link
Copy Markdown
Owner

问题

采样命中:

[TF-CLIPBOARD-OWNER] clipboard owner failed its bounded ready handshake:
mode=occupied step=DestroyWindow-cleanup win32_error=5 worker_error=5

DestroyWindow 失败时并不会可靠地设置 GetLastError,所以 win32_error=5 很可能是上一次失败调用(CloseClipboard-cleanup)的残留错误码,把真正的失败点掩盖了。

修改

两处清理调用前显式 SetLastError(0):

  • CloseClipboard-cleanup;
  • DestroyWindow-cleanup。

这样失败记录里的 win32_error 一定来自该步骤本身,而不会继承前一个错误码。

边界

Refs #85 #99

…s refs #85

DestroyWindow does not reliably set the last error, so a failure record could inherit the previous call code; both cleanup calls now clear it first.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T23:59:18.179236Z 23f3399 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@JavaZeroo
JavaZeroo merged commit b2dfe09 into main Oct 30, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant